package com.spring.ioc.demo.resource;

import java.io.InputStream;

public class ClasspathResource implements Resource{

    private String location;

    @Override
    public InputStream getResource() {
        return getClass().getClassLoader().getResourceAsStream(this.location);
    }

    public ClasspathResource(String location) {
        this.location = location;
    }
}
